{% extends ../base.html %} 
{% block title %}
<title>QUOTE | 投资智慧</title>
{% end %} 

{% block js_css %}
<script type="text/javascript" src="{{static_url('js/d3/d3.min.js')}}"></script>
<script type="text/javascript" src="{{static_url('js/d3/d3.time.min.js')}}"></script>
<link type="text/css" rel="stylesheet" href="{{static_url('css/quote/quote.css')}}"/>

<style type="text/css">

.axis line, .axis path {
  fill: none;
  stroke: #FFF;
  shape-rendering: crispEdges;
}

</style>
{% end %} 

{% block content %}
<div id="svg"></div>
<script>

var m = [20, 40, 20, 30],
    w = 960 - m[1] - m[3],
    h = 500 - m[0] - m[2],
    x = d3.time.scale().domain([new Date(2011, 07, 01), new Date(2011, 07, 11)]).range([0, w]),
    y = d3.scale.sqrt().range([h, 0]);
 
var xAxis = d3.svg.axis()
    .scale(x)
    .ticks(d3.time.days)
    .tickFormat(d3.time.format("%m/%d"));
 

var yAxis = d3.svg.axis()
    .scale(y);

var svg = d3.select("#svg").append("svg:svg")
    .attr("width", w + m[1] + m[3])
    .attr("height", h + m[0] + m[2])
  .append("svg:g")
    .attr("transform", "translate(" + m[3] + "," + m[0] + ")");

svg.append("svg:g")
    .attr("class", "bottom axis")
    .attr("transform", "translate(0," + h + ")")
    .call(xAxis.orient("bottom"));

svg.append("svg:g")
    .attr("class", "top axis")
    .call(xAxis.orient("top"));

svg.append("svg:g")
    .attr("class", "left axis")
    .call(yAxis.orient("left"));

svg.append("svg:g")
    .attr("class", "right axis")
    .attr("transform", "translate(" + w + ",0)")
    .call(yAxis.orient("right"));



</script> 
 
 
{% end %}

{% block footer %}
{% end %}